angular.module('moti.services.linesService', ['restangular'])
    .factory('LinesInterface', ['Restangular', 'Auth', function(Restangular, Auth){
        var lines = Restangular.all('admin');
        return {
            //获取景区路线列表
            getLinesList : function(request_body){
                return lines.customGET(INTERFACE_API.LINES.replace(":region_id", request_body.region_id), request_body, Auth);
            },
            //添加景区路线
             postLine : function(request_body){
                return lines.customPOST(request_body, INTERFACE_API.LINES.replace(":region_id", request_body.region_id), {}, Auth);
            },
            //修改景区路线
            putAdmin : function(request_info, request_body){
                return lines.customPUT(request_body, INTERFACE_API.LINES.replace(":region_id", request_info.region_id) + "/" + request_info.region_line_id, {}, Auth);
            }
        }
    }]);